import axios from "axios";

export async function getTopics() {
    const res = await axios.get("http://localhost:3000/api/topics")
    return res.data;
}

export async function getTopic(id: string) {
    const res = await axios.get(`http://localhost:3000/api/topics/${id}`)
    return res.data;
}